import os;


include_path = ['../src/cpp/main']
lib_path = ['.', '../build']
doxygen_path = []
qt4_path = ''

#include_path += ['C:\\Program Files (x86)\\boost\\boost_1_44']
#lib_path += ['C:\\Program Files (x86)\\boost\\boost_1_44\\lib']
#doxygen_path += ['C:\\Program Files (x86)\\doxygen\\bin']
#qt4_path = 'C:\\Program Files\\Nokia\\Qt4_czy_jakos_tak_inaczej'

# THE NAME OF THE OUTPUT LIBRARY
target_lib = 'CycleFinderLib'


env = Environment(tools = ["default", "doxygen"],
			CPPPATH = include_path,
			LIBPATH = lib_path,
			toolpath = '.')

if env['CC'] == 'cl':
	libs = ['boost_filesystem-vc100-mt-1_44', 'boost_system-vc100-mt-1_44', 'boost_program_options-vc100-mt-1_44', 'libboost_serialization-vc100-mt-s-1_44.lib']
else:
	libs = ['boost_regex', 'boost_unit_test_framework', 'boost_filesystem', 'boost_system', 'boost_program_options', 'boost_serialization']

env.Append(LIBS=libs)

if env['CC'] == 'cl':
	env.Append(CCFLAGS='/EHsc')
elif env['CC'] == 'gcc':
	env.Append(CCFLAGS='-ggdb3 -O2 -Wextra -pedantic')

env.AppendENVPath('PATH', doxygen_path)

qtenv = env.Clone()
qtenv['QT4DIR'] = qt4_path
qtenv.Tool('qt4')

# exports the envrionment settings
Export('env', 'qtenv', 'target_lib', 'libs')

SConscript('src/cpp/main/SConscript', variant_dir='build', duplicate=0)
SConscript('src/cpp/gui/SConscript', variant_dir='build-gui', duplicate=0)
SConscript('src/cpp/tests/SConscript', variant_dir='build-test', duplicate=0)

env.Doxygen("Doxyfile")
